/*
 * Copyright (C) 2008 nextcode:ch
 * 
 * Author: Michele Dell'Ambrogio, m@nextcode.ch
 * 
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of version 2 of the GNU General Public License as 
 * published by the Free Software Foundation.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 */

package sfplayer.videoPlayer;

import java.awt.Component;
import sfplayer.init.Preferences;

/**
 *
 * @author micc
 */
public class VideoController implements VideoEngine {

    private VideoEngine videoEngine = null;
    
    public VideoController() {
        
        if (Preferences.getVideoEngine().equals("Quicktime")) {
            videoEngine = new Quicktime();
        } else {
            throw new UnsupportedOperationException("Not supported yet.");
        }
        
    }
    
    public void start() {
        videoEngine.start();
    }
    
    public void stop() {
        videoEngine.stop();
    }
    
    public void openUrl(String url) {
        videoEngine.openUrl(url);
    }
    
    public Component getVideoComponent() {
        return videoEngine.getVideoComponent();
    }

    public void openFile(String file) {
        videoEngine.openFile(file);
    }
}
